package com.app.mapper;


import com.app.model.BrowseNumberModel;
import com.app.model.ComRecruitersModel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;


@Component
@Mapper
public interface BrowseNumberMapper extends BaseMapper<BrowseNumberModel> {


    List<BrowseNumberModel> selectAll(Integer page, Integer limit);
    /**
     * 根据城市查询浏览计数
     *
     * @param city 城市
     * @return {@link Integer}
     */
    Integer queryBrowseCount(@Param("city") String city);

    /**
     * 访问趋势数据
     *
     * @return {@link List}<{@link Map}<{@link String}, {@link Object}>>
     */
    List<Map<String, Object>> accessTrendsData(@Param("cityId") Integer cityId,
                                               @Param("time") String time);

    Integer userFrequencyAnalysis(@Param("startTime") Date startTime,
                                  @Param("endTime") Date endTime);

    Integer visitByCity(@Param("city") String city);
}
